package com.battery.system.domain;

import com.battery.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 积分兑换订单对象 ws_points_convert
 *
 * @author battery
 * @date 2021-03-24
 */
@Table(name = "ws_points_convert")
public class PointsConvert {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    private String id;

    /**
     * 平台-项目ID
     */
    private String projectId;

    /**
     * 直营合作商ID
     */
    private String partnerId;

    /**
     * 积分兑换方
     */
    @Excel(name = "积分兑换方")
    private Integer convertType;

    /**
     * 积分兑换方ID (平台ID 或 其他合作商ID)
     */
    private String convertId;

    /**
     * 地址
     */
    @Excel(name = "地址")
    private String addressId;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 审批进度
     */
    @Excel(name = "审批进度")
    private Long status;

    /**
     * 支付流水号
     */
    @Excel(name = "支付流水号")
    private String transactionId;

    /**
     * 审批通过时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审批通过时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approvalTime;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /**
     * 发货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")

    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryTime;

    /**
     * 商户订单号
     */
    @Excel(name = "商户订单号")
    private String outTradeNo;

    /**
     * 支付金额
     */
    @Excel(name = "支付金额")
    private BigDecimal payAmount;

    /**
     * 支付状态
     */
    @Excel(name = "支付状态")
    private Integer payStatus;

    /**
     * 积分总额
     */
    private int totalAmount;

    /**
     * 积分总额
     */
    @Excel(name = "积分总额")
    private int realPayAmount;

    /**
     * 邮费
     */
    @Excel(name = "邮费")
    private BigDecimal postAmount;

    /**
     * 优惠价格
     */
    @Excel(name = "优惠价格")
    private BigDecimal discountAmount;

    /**
     * 用户姓名
     */
    @Excel(name = "用户姓名")
    private String trueName;

    /**
     * 用户手机号
     */
    @Excel(name = "用户手机号")
    private String phone;

    /**
     * 设备id集
     */
    @Column(name = "devItems")
    private String devItems;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setConvertType(Integer convertType) {
        this.convertType = convertType;
    }

    public Integer getConvertType() {
        return convertType;
    }

    public void setConvertId(String convertId) {
        this.convertId = convertId;
    }

    public String getConvertId() {
        return convertId;
    }

    public void setAddressId(String addressId) {
        this.addressId = addressId;
    }

    public String getAddressId() {
        return addressId;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return status;
    }

    public void setApprovalTime(Date approvalTime) {
        this.approvalTime = approvalTime;
    }

    public Date getApprovalTime() {
        return approvalTime;
    }

    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public void setTotalAmount(int totalAmount) {
        this.totalAmount = totalAmount;
    }

    public int getTotalAmount() {
        return totalAmount;
    }

    public void setRealPayAmount(int realPayAmount) {
        this.realPayAmount = realPayAmount;
    }

    public int getRealPayAmount() {
        return realPayAmount;
    }

    public void setPostAmount(BigDecimal postAmount) {
        this.postAmount = postAmount;
    }

    public BigDecimal getPostAmount() {
        return postAmount;
    }

    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public String getTrueName() {
        return trueName;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }


    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public String getDevItems() {
        return devItems;
    }

    public void setDevItems(String devItems) {
        this.devItems = devItems;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("projectId", getProjectId())
                .append("partnerId", getPartnerId())
                .append("convertType", getConvertType())
                .append("convertId", getConvertId())
                .append("addressId", getAddressId())
                .append("remarks", getRemarks())
                .append("status", getStatus())
                .append("approvalTime", getApprovalTime())
                .append("deliveryTime", getDeliveryTime())
                .append("totalAmount", getTotalAmount())
                .append("realPayAmount", getRealPayAmount())
                .append("postAmount", getPostAmount())
                .append("discountAmount", getDiscountAmount())
                .append("trueName", getTrueName())
                .append("phone", getPhone())
                .toString();
    }
}
